﻿using System;
using System.Windows.Forms;

namespace Pibby.Controls
{
	/// <summary>
	/// TabControl that hides the tabbed header at runtime
	/// and only uses programmatic tab switching.
	/// </summary>
	public class MultiPanelControl : TabControl
	{
		private const int TCM_ADJUSTRECT = 0x1328;

		protected override void WndProc(ref Message m)
		{
			if (m.Msg == TCM_ADJUSTRECT && !this.DesignMode)
			{
				m.Result = (IntPtr)1;
			}
			else
			{
				base.WndProc(ref m);
			}
		}
	}
}
